Using web service to create a meshup page is fun, and easy with javabase<p/>
<ul>
<li>Add a list bean and set its clientId to photos and bean class to com.aetrion.flickr.photos.Photo</li>
<li>Add an image to the cell, and sets location to 
 ${photos.row.url}_s.jpg</li>
 <li>
  assing onClick with JB.Photo.loadImage('${photos.row.url}.jpg', 'largePicture', 'pictureHolder');&nbsp;&nbsp;
 </li>
 <li>Create a form with one field with field name as query. Assign onSumbit to com.jb.web.service.FlickrEventHandler.onSearch(code below) </li>
 <li>Add a hidden field, name it key and default value to flickr's key;</li>
 <li>
  Add a submit button, and onClick JB.submitForm('searchForm', 'resultPane');
 </li>
</ul>
  <p/>
  
 <pre>
List search(String key, String[] query) {
    Flickr flickr = new Flickr(key);
    SearchParameters sp = new SearchParameters();
    sp.setTags(query);
    return flickr.getPhotosInterface().search(sp, 20, 1);
}
public void onSearch(WebContext ctx, UIEvent e) {
    List list = search(e.get("key"), e.get("query").split(" "));
    ListBean bean = (ListBean)ctx.getComponent("photos");
    bean.setList(list);
}
 </pre>
  Click to dismiss